<template>
	<view>
		<block v-for="(item, itemIndex) in diyItems" :key="itemIndex">
			<!-- 搜索框 -->
			<block v-if="item.type === 'search'">
				<diy-search :itemIndex="itemIndex" :itemStyle="item.style" :params="item.params"></diy-search>
			</block>

			<!-- banner轮播 -->

			<block v-if="item.type === 'banner'">
				<diy-banner :itemIndex="itemIndex" :itemStyle="item.style" :params="item.params" :dataList="item.data">
				</diy-banner>
			</block>

			<!-- 单图组 -->

			<block v-if="item.type === 'imageSingle'">
				<diy-image-single :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data">
				</diy-image-single>
			</block>

			<!-- 视频组 -->

			<block v-if="item.type === 'video'">
				<diy-video :itemIndex="itemIndex" :itemStyle="item.style" :params="item.params"></diy-video>
			</block>

			<!-- 文章组 -->

			<block v-if="item.type === 'article'">
				<diy-article :itemIndex="itemIndex" :params="item.params" :dataList="item.data"></diy-article>
			</block>

			<!-- 头条快报 -->

			<block v-if="item.type === 'special'">
				<diy-special :itemIndex="itemIndex" :itemStyle="item.style" :params="item.params" :dataList="item.data">
				</diy-special>
			</block>

			<!-- 公告组 -->

			<block v-if="item.type === 'notice'">
				<diy-notice :itemIndex="itemIndex" :itemStyle="item.style" :params="item.params"></diy-notice>
			</block>

			<!-- 空白组 -->

			<block v-if="item.type === 'blank'">
				<diy-blank :itemIndex="itemIndex" :itemStyle="item.style"></diy-blank>
			</block>

			<!-- 辅助线 -->

			<block v-if="item.type === 'guide'">
				<diy-guide :itemIndex="itemIndex" :itemStyle="item.style"></diy-guide>
			</block>

			<!-- 在线客服 -->

			<block v-if="item.type === 'service'">
				<diy-service :itemIndex="itemIndex" :itemStyle="item.style" :params="item.params"></diy-service>
			</block>

			<!-- 富文本 -->

			<block v-if="item.type === 'richText'">
				<diy-rich-text :itemIndex="itemIndex" :itemStyle="item.style" :params="item.params"></diy-rich-text>
			</block>

			<!-- 导航组 -->

			<block v-if="item.type === 'navBar'">
				<diy-nav-bar :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data"></diy-nav-bar>
			</block>

			<!-- 图片橱窗 -->

			<block v-if="item.type === 'window'">
				<diy-window :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data"></diy-window>
			</block>

			<!-- 商品组 -->

			<block v-if="item.type === 'goods'">
				<diy-goods :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data"></diy-goods>
			</block>

			<!-- 优惠券组 -->

			<block v-if="item.type === 'coupon'">
				<diy-coupon :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data"></diy-coupon>
			</block>

			<!-- 拼团商品 -->

			<block v-if="item.type === 'sharingGoods'">
				<diy-sharing-goods :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data">
				</diy-sharing-goods>
			</block>

			<!-- 砍价商品 -->

			<block v-if="item.type === 'bargainGoods'">
				<diy-bargain-goods :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data">
				</diy-bargain-goods>
			</block>

			<!-- 秒杀商品 -->

			<block v-if="item.type === 'sharpGoods'">
				<diy-sharp-goods :itemIndex="itemIndex" :itemStyle="item.style" :data="item.data"></diy-sharp-goods>
			</block>

			<!-- 线下门店 -->

			<block v-if="item.type === 'shop'">
				<diy-shop :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data"></diy-shop>
			</block>

			<!-- 互动游戏 -->

			<block v-if="item.type === 'games'">
				<diy-games :itemStyle="item.style" :dataList="item.data"></diy-games>
			</block>

			<!-- 能量商品 -->

			<block v-if="item.type === 'pointProduct'">
				<diy-integral-goods :itemStyle="item.style" :dataList="item.data"></diy-integral-goods>
			</block>

			<!-- 关注公众号 -->

			<block v-if="item.type === 'officialAccount'">
				<diy-official-account :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data">
				</diy-official-account>
			</block>

			<!-- 预约商品 -->

			<block v-if="item.type === 'bookingGoods'">
				<diy-booking-goods :itemIndex="itemIndex" :itemStyle="item.style" :dataList="item.data">
				</diy-booking-goods>
			</block>
		</block>
	</view>
</template>

<script>
	import diyBanner from './banner/banner';
	import diySearch from './search/search';
	import diyImageSingle from './imageSingle/imageSingle';
	import diyVideo from './video/video';
	import diyArticle from './article/article';
	import diySpecial from './special/index';
	import diyBlank from './blank/blank';
	import diyGuide from './guide/guide';
	import diyNavBar from './navBar/navBar';
	import diyWindow from './window/window';
	import diyGoods from './goods/goods';
	import diyCoupon from './coupon/coupon';
	import diyNotice from './notice/notice';
	import diyService from './service/service';
	import diyRichText from './richText/richText';
	import diySharingGoods from './sharingGoods/sharingGoods';
	import diyBargainGoods from './bargainGoods/index';
	import diySharpGoods from './sharpGoods/index';
	import diyShop from './shop/index';
	import diyGames from './games/games';
	import diyIntegralGoods from './integralGoods/integralGoods';
	import diyOfficialAccount from './officialAccount/index';
	import diyBookingGoods from './bookingGoods/index';
	export default {
		data() {
			return {};
		},
		components: {
			diyBanner,
			diySearch,
			diyImageSingle,
			diyVideo,
			diyArticle,
			diySpecial,
			diyBlank,
			diyGuide,
			diyNavBar,
			diyWindow,
			diyGoods,
			diyCoupon,
			diyNotice,
			diyService,
			diyRichText,
			diySharingGoods,
			diyBargainGoods,
			diySharpGoods,
			diyShop,
			diyGames,
			diyIntegralGoods,
			diyOfficialAccount,
			diyBookingGoods
		},
		options: {},
		/**
		 * 组件的属性列表
		 * 用于组件自定义设置
		 */
		props: {
			diyItems: [Object, Array]
		}
	};
</script>
<style lang="scss">
</style>
